//
//  BaseNavigationController.m
//  YanzhouCloud
//
//  Created by Cocoa on 2019/7/1.
//  Copyright © 2019 yibai. All rights reserved.
//

#import "BaseNavigationController.h"
#import "UIImage+Gradient.h"
//#import "LoginManager.h"

@interface BaseNavigationController ()

@end

@implementation BaseNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationBar.translucent = NO;
    // Do any additional setup after loading the view.
    UIImage *btnBackgroundImg = [[UIImage new] createImageWithSize:ScreenSize gradientColors:@[UIColor.k_hexColor(0x6BA4FE), UIColor.k_hexColor(0x3A85F9)] percentage:@[@0.0,@1.0] gradientType:GradientFromLeftToRight];
    self.view.backgroundColor = [UIColor colorWithPatternImage:btnBackgroundImg];
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    if (self.viewControllers.count) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
//    //判断有没有登录
//    [LoginManager showLogin:^(BOOL success) {
//        if (success) {
//            [super pushViewController:viewController animated:animated];
//        }else{
//            
//        }
//    } willShowVC:viewController];
    
    [super pushViewController:viewController animated:animated];
}
- (UIViewController *)childViewControllerForStatusBarStyle {
    return self.topViewController;
}
@end
